Detecting Potential Deadlocks with Static Analysis and Run-Time Monitoring

نویسندگان

  • Rahul Agarwal
  • Liqiang Wang
  • Scott D. Stoller
چکیده

Concurrent programs are notorious for containing errors that are difficult to reproduce and diagnose. A common kind of concurrency error is deadlock, which occurs when a set of threads is blocked each trying to acquire a lock held by another thread in that set. Static and dynamic (run-time) analysis techniques exist to detect deadlocks. Havelund’s GoodLock algorithm detects potential deadlocks at runtime. However, it detects only potential deadlocks involving exactly two threads. This paper presents a generalized version of the GoodLock algorithm that detects potential deadlocks involving any number of threads. Run-time checking may miss errors in unexecuted code. On the positive side, run-time checking generally produces fewer false alarms than static analysis. This paper explores the use of static analysis to automatically reduce the overhead of run-time checking. We extend our type system, Extended Parameterized Atomic Java (EPAJ), which ensures absence of races and atomicity violations, with Boyapati et al.’s deadlock types. We give an algorithm that infers deadlock types for a given program and an algorithm that determines, based on the result of type inference, which run-time checks can safely be omitted. The new type system, called DeadlockFree EPAJ (DEPAJ), has the added benefit of giving stronger atomicity guarantees than previous atomicity type systems.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Static Detection of Deadlocks in Erlang

We address the problem of detecting two different kinds of possible deadlocks in Erlang programs using static analysis. Our analysis is completely automatic, fast and effective in detecting deadlocks while avoiding most false alarms. We have integrated our analysis in dialyzer, a widely used tool for detecting software defects in Erlang programs, and demonstrate its effectiveness on open-source...

متن کامل

Run - Time Analysis for Atomicity 1

Writing and debugging concurrent (shared-variable) programs is notoriously difficult. This motivated the development of numerous static analysis and run-time analysis techniques designed to (help) ensure that concurrent programs satisfy common correctness requirements for concurrent programs, such as absence of race conditions and absence of deadlocks. This paper focuses on another common corre...

متن کامل

A scalable deadlock detection algorithm for UPC collective operations

Unified Parallel C (UPC) is a language used to write parallel programs for shared and distributed memory parallel computers. Deadlock detection in UPC programs requires detecting deadlocks that involve either locks, collective operations, or both. In this paper, a distributed deadlock detection algorithm for UPC programs that uses run-time analysis is presented. The algorithm detects deadlocks ...

متن کامل

Sensitivity analysis of time lapse gravity for monitoring fluid saturation changes in a giant multi-phase gas reservoir located in south of Iran

The time lapse gravity method is a widely used technique to monitor the subsurface density changes in time and space. In hydrocarbon reservoirs, the density variations are due to different factors, such as: substitution of fluids with high density contrast, water influx, gas injection, and the variation in reservoir geomechanical behavior. Considering the monitoring of saturation changes in the...

متن کامل

Run-time Detection of Communication Deadlocks in Occam 2 Programs

A novel approach to detection of communication deadlocks in occam 2 programs is proposed. The main feature of the approach is to monitor the interprocess communications of a target occam 2 program at runtime and detect communication deadlocks in the program by operating a Process-Wait-For Graph (PWFG) of the program. The PWFG is a formal representation of the synchronization waiting situation i...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005